While media of various types have been used in recent years for recording digital data, CD-R discs in particular have quickly become commonly used as a low-cost recordable optical disc medium. The multi-session method used for writing data to these CD-R discs is now well known.
Data recording using this multi-session method is described next below with reference to accompanying figures.
FIG. 12 shows the data structure of a CD-R disc to which files managed using the volume/file structure defined in the ISO 9660 standard are recorded using a multi-session method. In a multi-session recording method, files and volume/file structure for managing the files are recorded in session units. Each session has a lead-in area, an inner link area, a user data area, and a lead-out area. It is to be noted that only the first session does not have a lead-in area. In addition, an outer link area is formed between sessions.
When recording a data session, files and volume/file structure for managing the file are first recorded to the user data area. The lead-out area is then recorded. This lead-out area is recorded to make data reproduction easier on a CD-ROM drive which is unable to detect a location in an unrecorded area on a CD-R disc because it is unable to detect the wobble address recorded to the CD-R disc. Data indicative of the address for a next session or user data area is then recorded to the lead-in area. A run-in block and run-out block are additionally recorded at the beginning and end of each area when recording to the user data area, lead-in area, or lead-out area. The run-in and run-out blocks are also partially overwritten on disc, and these overwritten areas are referred to as link blocks. An inner link area comprising a run-out block, link block, and run-in block is thus formed between a lead-in area and user data area and between a user data area and lead-out area, and an outer link area having the same configuration is formed between a lead-out area and lead-in area.
FIG. 13 shows the directory structure used for managing files recorded to a CD-R disc in conjunction with the data structure shown in FIG. 12. The directory structure shown in FIG. 13 has a subdirectory (Dir-A) for managing a data file (File-a), a subdirectory (Dir-B) for managing a data file (File-b), and a subdirectory (Dir-C) for managing a data file (File-c) below the root directory. When data file (File-a), data file (File-b), and data file (File-c) are sequentially recorded during a first session, second session, and third session in accordance with this directory structure, the data structure described above with reference to FIG. 12 is formed on the CD-R disc.
FIG. 14 is a flow chart describing a recording operation for forming the data structure shown in FIG. 12 on a disc. The data recording operation performed each session is described next below according to the steps shown in this flow chart.
(S1401) When a CD-R disc is inserted into the disk recorder, the disk recorder accesses the lead-in area reserved at a specific location at the inside circumference of the disc, and attempts to read the TOC data from this lead-in area. This TOC data is a table of contents for the data recorded on the data storage medium. If the TOC data is reproduced from the lead-in area, a step (S1402) for retrieving the following session data is performed. However, if the data could not be reproduced because the lead-in area is unrecorded, the session data recording operation is performed according to the procedure beginning in step (S1403).
(S1402) If the TOC data is reproduced from the lead-in area, the disk recorder reads the start address of the following session contained in this TOC data, returns to step (S1401), and then tries to reproduce data from the lead-in area of the following session.
(S1403) When a lead-in area to which no data is recorded is detected, the file recorded as the session data and the volume/file structure for managing said file are generated as follow.
First, when data is not reproduced from the lead-in area, the data file (File-a) to be recorded as the data for the first session, subdirectory (Dir-A) for managing data file (File-a), a directory file for managing the root directory, and volume/file structure, such as a primary volume descriptor and path table, for managing these files and the directory file, are generated according to the ISO 9660 standard.
If TOC data is reproduced from the lead-in area, the volume/file structure and directory file are read using the user data area start address contained in the most recently read TOC data. For example, with a disc to which only a first session has been recorded, data is read from user data area 1202; with a disc to which a second session has also been recorded, data is read from user data area 1205. The content of the volume/file structure is then updated by adding thereto the file newly recorded to the read data and a directory file for managing said file. For example, data file (File-b) and the subdirectory (Dir-B) for managing data file (File-b) are added to the data read from user data area 1202 on a disc to which only a first session has been recorded, and a new volume/file structure is then generated; data file (File-c) and the directory file (Dir-C) of the subdirectory for managing data file (File-c) are added to the data read from user data area 1205 on a disc to which a second session has also been recorded, and a new volume/file structure is then generated.
(S1404) When the volume/file structure to be recorded to a user data area is generated, a lead-in area and run-out block of predetermined recording size are skipped, a predefined link block/run-in block and link block/run-out block are added before and after the recording data generated in step (S1403), and the recording data is continuously recorded.
(S1405) When data recording to the user data area is completed, recording data having a predefined link block/run-in block and link block/run-out block added before and after the data recorded to the lead-out area is generated. The resulting recording data is then recorded continuously from the link block following the run-out block recorded in step (S1404). When recording the first session, for example, this operation records lead-out area 1203 and the link block/run-in block and run-out block/link block located therebefore and thereafter. When recording a second session, this operation records lead-out area 1206 and the link block/run-in block and run-out block/link block located therebefore and thereafter.
(S1406) When recording data to the lead-out area is completed, the start address for the next session is calculated with reference to the predefined recording size of the outer link area. The calculated start address of the next session is embedded with the start address of the user data area recorded in step (S1404) in the TOC data recorded to the lead-in area.
Recording data comprising predefined link block/run-in block and run-out block/link block units before and after the recording data for the lead-in area is then generated. The resulting recording data is then recorded continuously from a specific position at the inside circumference of the disk if the first session is being recorded, and from the link block following the run-out block recorded in step (S1405) if a second or third session is being recorded. As a result of this recording operation, the lead-in area 1201 at the most inside circumference and the run-out block/link block located immediately thereafter are recorded in the recording operation for a first session, for example. In a recording operation for a second session, the lead-in area 1204 and the link block/run-in block and run-out block/link block units positioned therebefore and thereafter are recorded, and the data recording operation ends.
The data recording operation described above forms a multi-session data structure such as shown in FIG. 12 on the disc. A logical sector number (LSN) is assigned to each sector in the data structure shown in FIG. 12 with the first sector in the user data area in the first session designated 0, and the logical sector number rising continuously at each successive sector. The volume space is defined as the area beginning from the sector at LSN 0.
The operation whereby a data file (File-a) is reproduced from the first session of a disk having a data structure as shown in FIG. 12 is described next below with reference to FIG. 12 and FIG. 14.
When a CD-R disc is inserted to a disc reader, the disc reader follows the procedure shown in steps (S1401) to (S1403) in the flow chart in FIG. 14 to read the latest volume/file structure 1220 from the user data area of the third session. If a CD-ROM drive is connected to a computer system, the host computer obtains the start address for the user data area of the third session to which the latest volume/file structure is recorded by executing READ TOC command. Using this start address, it then calculates the LSN of the sector to which the latest volume/file structure is recorded, and reads this structure from the disc.
Next, when the latest volume/file structure 1220 is read, the structure is interpreted according to the ISO 9660 standard using the primary volume descriptor 1221, path table 1222, root directory 1223, and directory file (Dir-A) 1224 for managing data file (File-a) 1225. The recording position of the data file is then read from the directory record of the data file (File-a) 1225 contained in directory file (Dir-A) 1224.
The data file (File-a) 1225 recorded to the user data area of the first session is then reproduced based on said data file recording position.
With a multi-session data storage medium recorded as described above, TOC data recorded to a lead-in area outside the volume space must be read using a special command such as the above-noted READ TOC command in order to find an unrecorded area of the medium for recording a data file or file management information for managing the data file to the medium, or to find the latest file management information on the medium for reproducing a data file or file management information for managing a data file on the medium.
Furthermore, when a read-only disk drive without the ability to detect a disc location from an unrecorded area accesses an unrecorded area, the head uncontrollable because a servo signal cannot be detected, resulting possibly in contact with the disc and the disc thus being scratched. In order for a CD-ROM drive to access such an unrecorded area, it is therefore necessary to detect the unrecorded area using a special method such as detecting the presence or absence of a servo signal.
Furthermore, when a disk is removed from a CD-R drive partially through a data recording session and is then inserted to a CD-ROM drive, the CD-ROM drive cannot detect whether impartially recorded data is present on the disc using only the information in the volume space because information indicating that data recorded was started is not recorded to the disk.
The present invention solves the above problems, and has as its object to provide a data storage medium enabling retrieval of unrecorded areas and recording and reproduction of data files recorded to the medium and file management information for managing these data files using only the volume/file structure, and enabling a read-only disk drive to detect the data recording status.